<?php
/**
 * Created by PhpStorm.
 * User: lihaitao
 * Date: 2019/9/9
 * Time: 上午10:09
 */

namespace app\index\controller;

use think\Request;
use think\Db;

class Adver extends Base
{
    public function status()
    {
        $adver = Db::name("adver")->where('id',1)->find();

        $lb1 = $adver['ad_lb1'];
        $lb2 = $adver['ad_lb2'];

        unset($adver['ad_lb1']);
        unset($adver['ad_lb2']);

        $adver['lb'][] = $lb1;
        $adver['lb'][] = $lb2;

        $data['data'] = $adver;
        $data['msg'] = '获取成功';
        return $this->_toSuccess($data);
    }
}